<!DOCTYPE html>
<html>
<head>
    <title>发布模拟考试</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("exam:simulationexamination:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("exam:simulationexamination:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("exam:simulationexamination:generateRq")>
            <a class="btn btn-primary" @click="generateRq"><i class="fa fa-pencil-square-o"></i>&nbsp;发布/取消</a>
			</#if>
			<#if shiro.hasPermission("exam:simulationexamination:generateRq")>
            <a class="btn btn-primary" @click="seeRq"><i class="fa fa-pencil-square-o"></i>&nbsp;查看二维码</a>
			</#if>
			<#if shiro.hasPermission("exam:simulationexamination:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
        			
        			<div class="form-group">
						<div class="col-sm-2 control-label">所属部门</div>
						<div class="col-sm-10">
							<input id="examinationDeptId" type="text" class="form-control" style="cursor:pointer;" v-model="simulationExamination.deptName" @click="deptTree" readonly="readonly" placeholder="所属部门"/>
						</div>
					</div>
					
                    <div class="form-group">
						<div class="col-sm-2 control-label">专业名称</div>
						<div class="col-sm-10">
						    <select id="majorId" v-model="simulationExamination.majorId" class="form-control" v-on:change="getPaperList(simulationExamination.majorId)">
						        <option v-for="item in majorLists" v-bind:value="item.id">{{item.majorName}}</option>
						    </select>
                        </div>
					</div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">试卷名称</div>
                        <div class="col-sm-10">
                            <!-- <input type="text" class="form-control" v-model="simulationExamination.paperId" placeholder="试卷id"/>  -->
                            
                            <select id="paperId" v-model="simulationExamination.paperId" class="form-control" v-on:change="setHighestPassScore(simulationExamination.paperId)">
						        <option v-for="item in paperList" v-bind:value="item.id">{{item.name}}</option>
						    </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">考试名字</div>
                        <div class="col-sm-10">
                            <input id="examinationName" type="text" class="form-control" v-model="simulationExamination.examinationName" placeholder="考试名字" lay-verify="title"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">考试开始时间</div>
                        <div class="col-sm-10">
                            <input id="examinationStartTime" type="text" class="form-control" v-model="simulationExamination.examinationStartTime" autocomplete="off" placeholder="考试开始时间"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">考试结束时间</div>
                        <div class="col-sm-10">
                            <input id="examinationEndTime" type="text" class="form-control" v-model="simulationExamination.examinationEndTime" autocomplete="off" placeholder="考试结束时间"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">可考次数</div>
                        <div class="col-sm-10">
                            <input id="examinationNumber" type="text" class="form-control" v-model="simulationExamination.examinationNumber" placeholder="可考次数"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">过关分数</div>
                        <div class="col-sm-10">
                            <input id="examinationPassScore" type="text" class="form-control" v-model="simulationExamination.examinationPassScore" placeholder="过关分数"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">考试时长</div>
                        <div class="col-sm-10">
                            <input id="examinationTimeLong" type="text" class="form-control" v-model="simulationExamination.examinationTimeLong" placeholder="考试时长"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">考试注意事项</div>
                        <div  class="col-sm-10" >
                        	<div id="examinationAttention" class="summernote" v-model="simulationExamination.examinationAttention" ></div>
                            <!-- <input id="examinationAttention" type="text" class="form-control" v-model="examination.examinationAttention" placeholder="考试注意事项"/>  -->
                        </div>
                    </div>

					<div class="form-group">
		                <div class="col-sm-2 control-label"></div>
		                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
		                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
		            </div>
        </form>
    </div>
</div>
<!-- 选择部门 -->
<div id="deptLayer" style="display: none;padding:10px;">
	<ul id="deptTree" class="ztree"></ul>
</div>

<script src="${request.contextPath}/statics/js/modules/exam/simulationexamination.js?_${.now?long}"></script>
</body>
</html>